home *** CD-ROM | disk | FTP | other *** search
/ NOVA - For the NeXT Workstation / NOVA - For the NeXT Workstation.iso / Documents / NeXTAnswers / objc.29 < prev    next >
Text File  |  1992-02-06  |  1KB  |  46 lines

  1. {\rtf0\ansi{\fonttbl\f1\fnil Times-Roman;\f2\fmodern Courier;\f0\fswiss Helvetica;}
  2. \paperw13040
  3. \paperh9540
  4. \margl120
  5. \margr120
  6. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f1\b0\i0\ul0\fs28 objc window server\
  7. \
  8. Q:  When can I download PostScript code to the Window Server?  Can I use the 
  9. \b +initialize
  10. \b0  methods for factory objects?\
  11. \
  12. A:  Object class 
  13. \b +initialize
  14. \b0  methods cannot download PostScript code to the Window Server because they are run before the connection to the Server has been established.  
  15. \b Initialize
  16. \b0  messages for classes always get sent before any other messages are delivered, specifically before 
  17. \f2\fs24 [Application new]
  18. \f1\fs28  has been executed.  But 
  19. \f2\fs24 [Application new]
  20. \f1\fs28  is what connects the program to the Server.\
  21. \
  22. A good time to download code to the server is after 
  23. \f2\fs24 [Application new]
  24. \f1\fs28  and loading the nib section, but before the application starts running.  In your 
  25. \b main
  26. \b0 (), after sending the  
  27. \b loadNibSection
  28. \b0  method, sent a 
  29. \b setUp
  30. \b0  message, like this:\
  31. \
  32.  
  33. \f2\fs24     [NXApp loadNibSection:"MyNibFile.nib" owner:NXApp];\
  34.     [NXGetNamedObject("MyObj", NXApp) setUp];\
  35.     \
  36.  
  37. \f1\b\fs28 setUp
  38. \b0  will be an instance method that downloads PostScript code to the Window Server.\
  39. \
  40.  QA29\
  41. \
  42. Valid for 1.0\
  43. Valid for 2.0\
  44. \
  45.  
  46.